/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package soundcontrol.soap;

/**
 *
 * @author Lianowar
 */

import java.util.ArrayList;
import java.util.List;
import javax.jws.WebService;

import javax.jws.soap.SOAPBinding;
import javax.jws.soap.SOAPBinding.Style;

 

@WebService
@SOAPBinding(style=Style.RPC)
public class SoundControlSoap 
{
    private PlayThread temp;
    
    List<PlayThread> test = new ArrayList<PlayThread>();
    
    public void PlaySound(String button)
    {
            
           test.add(0, new PlayThread(button));
           test.get(0).run();
      
    }
    
    public void StopPlaySound(String button)
    {
       PlayThread temp = null;
       System.out.print(button+"\n");
       for(PlayThread p : test)
       {
           if(p.getFile().equals(button))
           {
               
               temp = p;
               break;
           }
       }
        
       StopThread stop = new StopThread(temp.getP());               
       stop.run();
    }
    
    public void Close(String button)
    {
    
    }
    
    public void SetVolume(String volume)
    {
      
     
    }
}
